#通过占位形式完成拼接
name = "wjl"
address = "地球"
print("我的名字是%s,地址是%s" % (name, address))

'''
%s  将内容转化为字符串，放入占位位置
%d  将内容转化为整数，放入占位位置
%f  将内容转化为浮点型，放入占位位置 
'''

age = 13
salary = 10000.111

print("我的名字是%s,年龄是%d,薪资是%.2f" %(name, age, salary))

#第二种格式化
print(f"我的名字是{name},年龄是{age},薪资是{salary}")

name1 = "传播智课"
stock_price = 19.99
stock_code = "003032"
stock_price_daily_growth_factor = 1.2
growth_days = 7

finally_stock_price = stock_price*stock_price_daily_growth_factor**growth_days

print(f"公司:{name1},股票代码:{stock_code},当前股价:{stock_price}" )
print("每日增长系数:%f,经过%d增长后,股价达到了:%.2f" %(stock_price_daily_growth_factor,growth_days,finally_stock_price))